<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Edit Page</title>
</head>
<body>
<form action="{% url 'blog:edit_action' %}" method="post">
    {% csrf_token %}
    {% if article %}
        <input type="hidden" name="article_id" value="{{ article.id }}"></input>
    <label>文章标题
        <input type="text" name="title" value="{{ article.title }}"/>
    </label>
    <br>
        <label>文章内容
        <input type="text" name="content" value="{{ article.content }}"/>
    </label>
    <br>
    {% else %}
    <label>文章标题
        <input type="hidden" name="article_id" value="0"></input>
        <input type="text" name="title" />
    </label>
    <br>
        <label>文章内容
        <input type="text" name="content" />
    </label>
    <br>
    {% endif %}
    <input type="submit" value="提交">
</form>
</body>
</html>